import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);
const router = new VueRouter({
    mode:'hash',
    routes:[
        {
            path:'/shouye',
            name:'shouye',
            component:()=>import('../views/ShouYe.vue'),
            meta:{
                show:true
            }
        },
        {
            path:'/itemdetail/:id',
            name:'itemdetail',
            component:()=>import('../views/shouye/ItemDetail.vue')
        },
        {
            path:'/fenlei',
            name:'fenlei',
            component:()=>import('../views/FenLei.vue'),
            meta:{
                show:true
            }
        },
        {
            path:'/car',
            name:'car',
            component:()=>import('../views/Car.vue'),
            meta:{
                show:true
            }
        },
        {
            path:'/',
            redirect:'/shouye'
        }

    ]
})
export default router;